package com.atguigu.yygh.cmn.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author 杨林
 * @create 2022-11-03 15:38 星期四
 * description:
 */
@SpringBootConfiguration
@EnableTransactionManagement //开启事务注解
@MapperScan("com.atguigu.yygh.cmn.mapper")
@ComponentScan(basePackages = "com.atguigu")
public class CmnConfig {

    /**
     * 配置分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }
}
